import React, { Component } from 'react';
import { Process } from './index'
import Style from './index.scss'

class ProcessList extends Component {
    constructor(props) {
        super(props);

    }

    componentWillMount() {

    }

    componentDidMount() {

    }

    componentWillUnmount() {

    }

    render() {

        return (
            <div className={Style.processList}>
                {this.props.list.map((item, i) => {
                    let isLine = this.props.list.length-1 == i&&i!=0?true:false;
                    return (
                        <Process key={i} index={i} isLine = {isLine} {...item}/>
                    )
                })}
            </div>
        );
    }
}

ProcessList.defaultProps = {
    list: [], //列表数据
    //fail: false, //失败
}

export default ProcessList;